package hernanbosqued.parking;

import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.view.WindowManager;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;

class Util
{
	public static Dialog getProgressDialog( Context p_context )
	{
		Dialog dialog = new Dialog( p_context, R.style.DialogCustom );
		dialog.setCancelable( true );
		dialog.getWindow( ).clearFlags( WindowManager.LayoutParams.FLAG_DIM_BEHIND );
		dialog.getWindow( ).setBackgroundDrawable( new ColorDrawable( 0 ) );
		dialog.addContentView( new ProgressBar( p_context ), new RelativeLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT ) );

		return dialog;
	}
}
